
<style type="text/css">
		.deny {
			padding-left: 250px;
			padding-top: 10px;
		}
		.pass {
			padding-top: 10px;
			padding-bottom: 10px;
			padding-left: 250px;
		}

		#deny_reason{
			padding-left: 5px;
			margin-left: 5px;
		}
	</style>
<div class="content">
		<div class="info-title">待审核资源信息</div>
		<div class="container-fluid">
			<div class="row-fluid">
				<!-- <div class="span3" style="border:1px solid #E5E5E5;height:584px">
					<ul class="nav nav-list">
						<li class="nav-header" style="font-size:20px;padding-top:15px">资源信息</li>
						<li class="divider"></li>
						<li class=""><a href="/EECloud/index.php/publishres/main">基本资料</a></li>
						<li class="divider"></li>
						<li><a href="/EECloud/index.php/publishres/detail">详细资料</a></li>
						<li class="divider"></li>
						<li><a href="/EECloud/index.php/userinfo/interests">兴趣爱好</a></li>
						<li class="divider"></li>
						<li><a href="/EECloud/index.php/userinfo/education">教育背景</a></li>
						<li class="divider"></li>
						<li><a href="/EECloud/index.php/userinfo/career">工作信息</a></li>
						<li class="divider"></li>
						<li><a href="/EECloud/index.php/userinfo/portrait">头像设置</a></li>
						<li class="divider"></li>
						<li class="nav-header" style="font-size:20px">其他资源</li>
					</ul>
				</div> -->
				<div class="span9" style="">
<div class="content-title">待审核资源信息</div>
<div class="info-content">
	<form id="public__check_res_form" action="/EECloud/index.php/publishres/admin_check_result">
		<table class="info" cellpadding="5px">
			<tr>
				<td>资源名称：</td>
				<input id="res_check_id" type="hidden" name="res_check_id" value="<?=$detail['id']?>" />
				<td><input type="text" value="<?=$detail['resource_title']?>" readonly></td>
			</tr>
			<tr>
				<td>资源提交者：</td>
				<td><input type="text" value="<?=$user_name?>" readonly></td>
			</tr>
			<tr>
				<td>资源类型：</td>
				<td>
					<input type="text" value="<?=$detail['resource_type']?>" readonly>
				</td>
			</tr>
			<tr>
				<td>资源介绍：</td>
				<td><textarea id="new_res_desc" name="res_desc" style="width:350px;height:138px;resize:none"><?=$detail['resource_description']?></textarea></td>
			</tr>
			<tr>
				<td>适用人群：</td>
				<td>
					<input type="text" value="<?=$detail['resource_suit']?>" readonly>
				</td>
			</tr>
			<tr>
				<td>管理员意见：</td>
				<td>
					<textarea id="admin_advice" style="width:350px;height:138px;resize:none"></textarea>
				</td>
			</tr>
			<!-- <tr>
				<td></td>
				<td><a href="javascript:void(0);" id="pass_check" class="btn btn-primary">通过审核</a></td>
			</tr>

			<tr><td></td>
				<td><a href="javascript:void(0);" id="deny_check" class="btn btn-primary">拒绝审核</a></td>
				<td><select>
					
				</select>
			</td>
			</tr> -->
		</table>
		<div class="pass">
			<a href="javascript:void(0);" id="pass_check" class="btn btn-primary">通过审核</a>
			<!-- <select></select> -->
		</div>
		<div class="deny">
			<a href="javascript:void(0);" id="deny_check" class="btn btn-primary">拒绝审核</a>
			<select id="deny_reason">
				<option value="1">资源版本太低</option>
				<option value="2">资源内容老旧</option>
				<option value="3">资源不符合要求</option>
				<option value="4">该资源不适合发布</option>
			</select>
		</div>

	</form>	
</div>

<script type="text/javascript">
	
	$(document).ready(function(){

		$('#pass_check').click(function(){

			var id = $('#res_check_id').val();
			var new_res_desc = $('#new_res_desc').val();
			var admin_advice = $('#admin_advice').val();

			$.post('/EECloud/index.php/publishres/ajax_admin_pass_check','id=' + id + '&new_res_desc=' + new_res_desc + '&admin_advice=' + admin_advice,function(data){
				window.location.href = '/EECloud/index.php/publishres/allres';

			},'json');
		});

		$('#deny_check').click(function(){

			var id = $('#res_check_id').val();
			var new_res_desc = $('#new_res_desc').val();
			var admin_advice = $('#admin_advice').val();
			var deny_reason = $('#deny_reason').find("option:selected").text();

			$.post('/EECloud/index.php/publishres/ajax_admin_deny_check','id=' + id + '&new_res_desc=' + new_res_desc + '&admin_advice=' + admin_advice + '&deny_reason=' + deny_reason,function(data){
				window.location.href = '/EECloud/index.php/publishres/allres';

			},'json');
		});
	});

function pass_check(id){
	window.location.href = '/EECloud/index.php/publishres/resInfo?id=' + id;
}

function pass_check(id){
	window.location.href = '/EECloud/index.php/publishres/resInfo?id=' + id;
}
</script>